-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix handling of arrays in two-argument ranges::distance
#2500
Conversation
.... which was broken by LWG-3392. This implements the proposed resolution of a submitted-but-not-yet-numbered LWG issue.
@@ -3474,9 +3474,19 @@ namespace vso1121031 { | |||
STATIC_ASSERT(!has_member_value_type<indirectly_readable_traits<iterish<float const volatile>>>); | |||
} // namespace vso1121031 | |||
|
|||
constexpr bool test_lwg_XXX() { | |||
int a[3] = {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add another const array for my paranoia
@@ -3474,9 +3474,19 @@ namespace vso1121031 { | |||
STATIC_ASSERT(!has_member_value_type<indirectly_readable_traits<iterish<float const volatile>>>); | |||
} // namespace vso1121031 | |||
|
|||
constexpr bool test_lwg_XXX() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to annotate (here and in the header) with the proper issue number before merging.
Converted to draft after Tim pointed out some issues with the PR. |
This includes an experimental workaround for LWG3664 "LWG3392 broke std::ranges::distance(a, a+3)", but the workaround may be incomplete, I'm not sure. This should be re-audited when LWG3664 is actually adopted, to see if we need to change anything about our implementation. See also microsoft/STL#2500 Differential Revision: https://reviews.llvm.org/D117940
This PR was superseded by #2522. |
This includes an experimental workaround for LWG3664 "LWG3392 broke std::ranges::distance(a, a+3)", but the workaround may be incomplete, I'm not sure. This should be re-audited when LWG3664 is actually adopted, to see if we need to change anything about our implementation. See also microsoft/STL#2500 Differential Revision: https://reviews.llvm.org/D117940
This includes an experimental workaround for LWG3664 "LWG3392 broke std::ranges::distance(a, a+3)", but the workaround may be incomplete, I'm not sure. This should be re-audited when LWG3664 is actually adopted, to see if we need to change anything about our implementation. See also microsoft/STL#2500 Differential Revision: https://reviews.llvm.org/D117940
This includes an experimental workaround for LWG3664 "LWG3392 broke std::ranges::distance(a, a+3)", but the workaround may be incomplete, I'm not sure. This should be re-audited when LWG3664 is actually adopted, to see if we need to change anything about our implementation. See also microsoft/STL#2500 Differential Revision: https://reviews.llvm.org/D117940
.... which was broken by LWG-3392. This implements the proposed resolution of a submitted-but-not-yet-numbered LWG issue.